package com.leff.cards.util;

import java.util.HashMap;

import org.json.simple.JSONObject;

public class Dictionary extends HashMap<String, Object> {
	private static final long serialVersionUID = 1L;
	
	public static Dictionary fromJSONObject(Object O) {
		
		Dictionary dict = new Dictionary();
		
		JSONObject obj = (JSONObject)O;
		for(Object key : obj.keySet()) {
			
			String keyStr = (String)key;
			dict.put(keyStr, obj.get(key));
		}
		
		return dict;
	}
}
